package org.linlinjava.litemall.admin.web;

import org.linlinjava.litemall.core.util.ResponseUtil;
import org.linlinjava.litemall.db.service.LitemallRegionService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author jie
 * @date 2019/7/19 -16:47
 */
@RestController
@RequestMapping("/admin/region")
public class AdminRegionController {

    @Resource
    private LitemallRegionService regionService;

    @GetMapping("/list")
    public Object list() {
        return ResponseUtil.okList(regionService.getAllRegions());
    }
}
